<?php

namespace app_supplier\models;

use Yii;

/**
 * This is the model class for table "store_purchasing_demand".
 *
 * @property integer $id
 * @property integer $store_id
 * @property string $dealer_number
 * @property integer $user_id
 * @property string $mobile
 * @property string $address
 * @property string $operation
 * @property integer $status
 * @property string $describe
 * @property string $create_time
 * @property string $update_time
 * @property string $demand_time
 * @property string $user_name
 * @property string $cmbArea
 * @property string $cmbCity
 * @property string $cmbProvince
 */
class StorePurchasingDemand extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'store_purchasing_demand';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['store_id', 'user_id', 'status'], 'integer'],
            [['dealer_number'], 'required'],
            [['create_time', 'update_time', 'demand_time'], 'safe'],
            [['dealer_number'], 'string', 'max' => 45],
            [['mobile'], 'string', 'max' => 12],
            [['address', 'describe'], 'string', 'max' => 256],
            [['operation'], 'string', 'max' => 16],
            [['user_name', 'cmbArea', 'cmbCity', 'cmbProvince'], 'string', 'max' => 32],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'store_id' => 'Store ID',
            'dealer_number' => 'Dealer Number',
            'user_id' => 'User ID',
            'mobile' => 'Mobile',
            'address' => 'Address',
            'operation' => 'Operation',
            'status' => 'Status',
            'describe' => 'Describe',
            'create_time' => 'Create Time',
            'update_time' => 'Update Time',
            'demand_time' => 'Demand Time',
            'user_name' => 'User Name',
            'cmbArea' => 'Cmb Area',
            'cmbCity' => 'Cmb City',
            'cmbProvince' => 'Cmb Province',
        ];
    }
}
